package com.eazytec.efs.common;

import java.io.File;
import java.io.OutputStream;

/**
 * 上传下载对外返回参数集合
 *
 * @author Zhaozx
 * @create 2017-10-11 13:47
 **/
public class ResultMsg {

    public ResultMsg() {
        this.code = Constants.success_code;
        this.msg = "";
        this.file = null;
        this.downBean = new DownBean();
    }

    private String code;

    private String msg;

    private File file;

    private DownBean downBean;

    public DownBean getDownBean() {
        return downBean;
    }

    public void setDownBean(DownBean downBean) {
        this.downBean = downBean;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ResultMsg(String code, String msg) {
        this.code = code;
        this.msg = msg;
        this.file = null;
    }

    public ResultMsg(String code, String msg, File file) {
        this.code = code;
        this.msg = msg;
        this.file = file;
    }

    public ResultMsg(String code, String msg, OutputStream outputStream) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "ResultMsg{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", file=" + file +
                '}';
    }
}
